<template>
  <div class="login">
    <h1>Welcome To Egret Music</h1>
    <h2>Please Login In</h2>
    <div class="inputBox">
      <div class="textBox">
        <span>Account:</span>
        <span>Password:</span>
      </div>
      <div class="inputs">
        <input type="text" v-model.lazy="phone">
        <input type="password" v-model.lazy="password">
      </div>
    </div>
    <button @click="login">Login</button>

  </div>
</template>

<script>
export default {
  data() {
    return {
      phone: '',
      password: '',
    }
  },
  methods: {
    login() {
      let result = this.$store.dispatch('getLogin', { phone: this.phone, password: this.password })
      console.log(result);
    }
  }
}
</script>

<style lang="less" scoped>
.icon {
  position: fixed;
  left:10px;
  top:10px;
  width:.5rem;
  height:.5rem;
}
.login {
  text-align: center;

  h1 {
    margin-top: 100px;
    color: rgb(55, 198, 145)
  }

  h2 {
    margin-top: 20px;
    color: rgb(55, 198, 145)
  }

  .inputBox {
    width: 100%;
    display: flex;
    margin-top: 100px;
    justify-content: center;

    .textBox,
    .inputs {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      align-items: flex-start;
      margin-right: 20px;
      height: 70px;
      font-family: 'Courier New', Courier, monospace;
      font-weight: bold;
      font-size: 18px;
    }

    .inputs {
      margin: 0;

      input {
        width: 200px;
        border: none;
        border-bottom: 1px solid rgb(55, 198, 145);
        font-size: 16px;
        font-weight: normal;
        transform: all .3s ease;

        &:focus {
          border: 1px solid rgb(55, 198, 145)
        }
      }
    }
  }

  button {
    width: 100px;
    height: 40px;
    margin-top: 30px;
    color: rgb(55, 198, 145);
    font-family: cursive;
    font-size: 18px;
    font-weight: bold;
    border: 1px solid rgb(55, 198, 145);
    border-radius: 5px;
  }
}
</style>